package com.naiterui.ehp.ps.sms.enums;

public enum MontnetStatus {
    SUCCESS(0, "成功"),

    CONTENT_OVER_LENGTH(-100011, "短信内容超长"),
    PHONE_INVALID(-100012, "手机号码不合法"),

    FAILED(-100999, "系统未知错误");
    /**
     * 异常代码
     */
    public final int code;

    /**
     * 异常消息
     */
    public final String msg;

    /**
     * 构造函数
     */
    MontnetStatus() {
        this.code = 0;
        this.msg = "success";
    }

    /**
     * 构造函数
     *
     * @param code
     * @param msg
     */
    MontnetStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 获取异常信息
     * CloopenStatus.msg()<BR>
     * <P>Author :  </P>
     * <P>Date : 2017-7-28 </P>
     *
     * @return
     */
    public String msg() {
        return this.msg;
    }

    /**
     * 获取异常状态码
     * CloopenStatus.code()<BR>
     * <P>Author :  </P>
     * <P>Date : 2017-7-28 </P>
     *
     * @return
     */
    public int code() {
        return this.code;
    }
}
